.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.animate-card {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.question-card {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.question-card:hover {
    transform: translateY(-3px);
}

.option-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.question-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-label:hover {
    border-color: #90caf9;
    box-shadow: 0 8px 16px rgba(144, 202, 249, 0.2);
}

input[type="radio"]:checked + .option-label {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.08);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.12);
    animation: optionSelect 0.4s ease;
}

@keyframes optionSelect {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.option-text {
    font-weight: 500;
    color: #424242;
    font-size: 1.1rem;
    text-align: center;
    padding: 0 1rem;
}

.student-card {
    transition: transform 0.3s ease;
}

.student-card:hover {
    transform: translateY(-5px);
}

.mbti-result {
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
/* 保持原有全部样式不变 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.animate-card {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 其他所有样式保持不变... */
.question-card {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 新增管理面板样式 */
.card-header .btn-link {
    width: 100%;
    text-align: left;
    position: relative;
}

.card-header .btn-link::after {
    content: "▼";
    position: absolute;
    right: 15px;
    transition: transform 0.3s;
}

.card-header .btn-link[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.list-group-item {
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.list-group-item:hover {
    transform: translateX(5px);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

.badge.bg-light {
    border: 1px solid #dee2e6;
    font-weight: normal;
}

.student-card {
    transition: transform 0.3s ease;
}

.student-card:hover {
    transform: translateY(-3px);
}
/* 图表卡片样式 */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
}

/* 图表图例调整 */
.chartjs-legend li {
    display: inline-block;
    margin: 5px 10px;
}

.chartjs-legend span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
}
/* 雷达图容器 */
#traitChart {
    min-height: 300px;
}

/* 特征列表项 */
.list-group-item {
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* 职业卡片 */
.card.text-center {
    transition: transform 0.3s;
}

.card.text-center:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
/* 保持其他原有样式不变... */
/* 剩余样式与之前提供的完全相同... */
.progress-container {
    position: sticky;
    top: 20px;
    z-index: 1000;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.progress-bar-animated {
    transition: width 0.5s ease;
}

.floating-save {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.question-card {
    scroll-margin-top: 100px; /* 为锚点跳转留出空间 */
}
/* 保留原有样式... */

/* 新增样式 */
.sticky-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e9ecef;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.sticky-progress.hidden {
    transform: translateY(-100%);
}

.progress-container {
    max-width: 1200px;
    margin: 0 auto;
}

.progress-bar-animated {
    transition: width 0.5s ease;
}

.question-card {
    scroll-margin-top: 100px; /* 为锚点跳转留出空间 */
}

.save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}
/* 移动端优化 - 添加到现有样式 */

/* 选项容器 - 移动端改为单列 */
@media (max-width: 768px) {
    .option-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .option-label {
        height: auto !important;
        min-height: 70px;
        padding: 12px 10px !important;
    }
    
    .option-text {
        font-size: 0.95rem !important;
        line-height: 1.4;
    }
    
    .question-card {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .card-body {
        padding: 15px !important;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .option-label {
        min-height: 60px;
        padding: 10px 8px !important;
    }
    
    .option-text {
        font-size: 0.9rem !important;
    }
    
    .question-card p {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }
    
    .card-header {
        padding: 15px !important;
    }
    
    .btn-lg {
        font-size: 1rem !important;
        padding: 12px !important;
    }
}

/* 防止iOS缩放 */
html {
    touch-action: manipulation;
}

/* 优化输入框 */
input[type="radio"] + .option-label {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;
}
/* 添加以下样式 */
.question-card {
    scroll-margin-top: 70px; /* 与进度条高度匹配 */
}

@media (max-width: 480px) {
    .question-card {
        scroll-margin-top: 60px;
    }
}

/* 防止滚动跳跃 */
html {
    scroll-behavior: smooth;
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    .container {
        min-height: 100vh;
    }
}
/* 添加以下内容到 style.css 文件末尾 */

/* 全局移动端优化 */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --mobile-padding: 15px;
    --progress-height: 70px;
}

body {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* 容器优化 */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
}

.container.py-5 {
    padding-top: calc(var(--progress-height) + 15px) !important;
    padding-bottom: 20px !important;
}

/* 卡片优化 */
.card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* 按钮优化 */
.btn {
    padding: 10px 18px;
    font-size: 16px;
    border-radius: 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 18px;
}

/* 表单优化 */
.form-control {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
    min-height: 50px;
}

/* 固定在顶部的进度条 */
.sticky-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid #e9ecef;
    height: var(--progress-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.progress {
    height: 10px;
    border-radius: 5px;
}

.progress-bar {
    transition: width 0.5s ease;
}

/* 保存提示 */
.save-indicator {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1100;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* 移动端优化 */
@media (max-width: 768px) {
    :root {
        --mobile-padding: 12px;
        --progress-height: 65px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    h1, h2, h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.3rem;
    }
    
    h5 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 15px;
        min-height: 44px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 15px;
        min-height: 46px;
    }
    
    .sticky-progress {
        padding: 8px 12px;
    }
    
    /* 测试页选项改为单列 */
    .option-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .option-label {
        min-height: 80px !important;
        padding: 12px !important;
    }
    
    .option-text {
        font-size: 15px !important;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    :root {
        --mobile-padding: 10px;
        --progress-height: 60px;
    }
    
    body {
        font-size: 15px;
    }
    
    .card-header {
        padding: 10px 12px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    .btn {
        padding: 9px 14px;
        font-size: 14px;
        min-height: 42px;
    }
    
    .form-control {
        padding: 11px 13px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .sticky-progress {
        padding: 7px 10px;
    }
    
    .save-indicator {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .option-label {
        min-height: 75px !important;
        padding: 10px !important;
    }
    
    .option-text {
        font-size: 14px !important;
    }
}

/* 测试页面特定样式 */
.question-card {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    scroll-margin-top: var(--progress-height);
}

.question-card p {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* 结果页特定样式 */
.dimension-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    margin: 5px;
    min-width: 80px;
    justify-content: center;
}

.trait-chart-container {
    height: 300px;
    position: relative;
}

/* 管理员面板样式 */
.admin-card {
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
}

.admin-card .card-header {
    padding: 12px 15px;
    font-size: 16px;
}

.student-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* 防止iOS缩放 */
input, select, textarea {
    font-size: 16px !important;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
    select:focus, textarea:focus, input:focus {
        font-size: 16px !important;
    }
}

/* 滚动优化 */
html {
    scroll-behavior: smooth;
    touch-action: manipulation;
}
/* 添加以下内容到 style.css 文件末尾 */

/* 测试长度选择页特定样式 */
.test-length-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.test-length-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.test-length-card.short {
    border-top: 6px solid #4CAF50;
}

.test-length-card.medium {
    border-top: 6px solid #FFC107;
}

.test-length-card.full {
    border-top: 6px solid #F44336;
}

.length-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.short .length-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
}

.medium .length-icon {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: white;
}

.full .length-icon {
    background: linear-gradient(135deg, #F44336 0%, #E91E63 100%);
    color: white;
}

.length-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.length-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    border-radius: 2px;
}

.short .length-title::after {
    background: #4CAF50;
}

.medium .length-title::after {
    background: #FFC107;
}

.full .length-title::after {
    background: #F44336;
}

.length-description {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 25px;
    min-height: 80px;
}

.length-btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.length-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: transform 0.5s ease;
    transform: scaleX(0);
    transform-origin: right;
}

.length-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.short .length-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.short .length-btn::before {
    background: linear-gradient(135deg, #8BC34A 0%, #4CAF50 100%);
}

.medium .length-btn {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.medium .length-btn::before {
    background: linear-gradient(135deg, #FF9800 0%, #FFC107 100%);
}

.full .length-btn {
    background: linear-gradient(135deg, #F44336 0%, #E91E63 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(244, 67, 54, 0.3);
}

.full .length-btn::before {
    background: linear-gradient(135deg, #E91E63 0%, #F44336 100%);
}

.length-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.length-duration {
    font-size: 0.9rem;
    color: #777;
    margin-top: 15px;
    display: block;
}

.card-container {
    perspective: 1500px;
}

.test-length-card {
    transform-style: preserve-3d;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .test-length-card {
        margin-bottom: 30px;
    }
    
    .length-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .length-title {
        font-size: 1.6rem;
    }
    
    .length-description {
        min-height: auto;
        margin-bottom: 20px;
    }
    
    .length-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .length-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .length-title {
        font-size: 1.4rem;
    }
    
    .length-description {
        font-size: 0.95rem;
    }
}

/* 测试页头部样式 */
.test-header {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.test-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.test-length-badge {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.length-20 {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
}

.length-60 {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: white;
}

.length-120 {
    background: linear-gradient(135deg, #F44336 0%, #E91E63 100%);
    color: white;
}
/* 管理员进度条样式 */
.student-item .progress {
    border-radius: 10px;
    height: 10px;
    background-color: #e9ecef;
}

.student-item .progress-bar {
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* 进度颜色 */
.progress-bar-0-25 {
    background-color: #ff6b6b;
}

.progress-bar-25-50 {
    background-color: #ffc107;
}

.progress-bar-50-75 {
    background-color: #45b7d1;
}

.progress-bar-75-100 {
    background-color: #4CAF50;
}

/* 学生项悬停效果 */
.student-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.student-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transform: translateY(-3px);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .student-item .progress {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .student-item .progress {
        width: 100px;
    }
    
    .student-item h6 {
        font-size: 1rem;
    }
}
/* 添加动画效果 */
.student-item {
    transition: all 0.3s ease;
}

.student-item.added {
    animation: highlightAdded 1.5s;
}

.student-item.removed {
    animation: highlightRemoved 1s forwards;
}

.student-item.updated {
    animation: highlightUpdated 1.5s;
}

@keyframes highlightAdded {
    0% { 
        background-color: #d4edda; 
        transform: scale(0.95); 
        opacity: 0; 
    }
    50% { 
        background-color: #d4edda; 
        transform: scale(1.02); 
    }
    100% { 
        background-color: transparent; 
        transform: scale(1); 
        opacity: 1; 
    }
}

@keyframes highlightRemoved {
    0% { 
        opacity: 1; 
        transform: translateX(0); 
    }
    100% { 
        opacity: 0; 
        transform: translateX(100%); 
        height: 0; 
        padding: 0; 
        margin: 0; 
        border: none; 
    }
}

@keyframes highlightUpdated {
    0% { 
        background-color: #fff3cd; 
    }
    100% { 
        background-color: transparent; 
    }
}

.progress-bar-dynamic {
    transition: width 0.5s ease;
}